from tkinter.tix import Tree
import win32api,win32con,time


def start(move_speed = 20):
    while True:
        #左
        if win32api.GetAsyncKeyState(37):
            win32api.mouse_event(win32con.MOUSEEVENTF_MOVE,-move_speed,0,0,0)
        #右
        elif win32api.GetAsyncKeyState(39):
            win32api.mouse_event(win32con.MOUSEEVENTF_MOVE,move_speed,0,0,0)
        time.sleep(0.01)